package com.zzs.server.pojo.dto.problem;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @author zzs
 * @date 2025/03/17
 */
@AllArgsConstructor
@NoArgsConstructor
@Data
public class SaveProblemDTO {
    @NotBlank(message = "标题不能为空")
    private String title;

    @NotBlank(message = "内容不能为空")
    private String content;

    /**
     * 难度区间参考{@link com.zzs.common.core.enums.ProblemDifficulty}
     */
    @NotNull(message = "必须选择难度")
    @Min(value = 1, message = "难度区间: 简单, 中等, 困难")
    @Max(value = 3, message = "难度区间: 简单, 中等, 困难")
    private Integer difficulty;
}
